<div class="clear"></div>


<!-- 开始回帖 -->

<div class="rules">
    <div class="inner">
    	<span class="corners-top"><span></span></span>
      		<div class="postbody">
                <h3><a href="/posts/<%= @main.id %>"><%= image_tag "icons/talk.png" %><%= @main.title %></a></h3> 
                    <p class="author">
                      <a href="#"><img src="/images/icon_post_target.gif" alt="Post" title="Post" width="11" height="9"/></a>
                      &nbsp;<%= @main.created_at.to_s(:cn_time) %>
                    </p>
                    <a name="posts_<%= @main.id %>"></a>
                    <div class="content">
                      <%= @main.html_content %>
                    <div style="margin-top:20px;">
                    	<%= image_tag "icons/tags.gif" %>
                      <% @main.tags.each do |e| %>
												<%= link_to e.name,:controller => "posts",:action => "index",:id => e.id %>
											<% end %>
										</div>
                    </div>
                    <div class="signature">
                    </div>
                  </div>

                  <div class="back2top">
                  	<a class="top" href="#wrap">回顶</a>
                	</div>

                  <span class="corners-bottom"><span></span></span>
      </div>
	</div> 


<% 
  background = 1 
%>
<% @posts.each do |post| %>
	<% background == 2 ? background = 1 : background = 2 %>
  <div class="<%= "post bg#{background}" %>">
    <div class="inner">
    	<span class="corners-top"><span></span></span>
      		<div class="postbody">
                <h3><%= post.title %></h3> 
                    <p class="author">
                      <a href="#"><img src="<%= images_root %>icon_post_target.gif" alt="Post" title="Post" width="11" height="9"/></a>
                      &nbsp;<%= post.created_at.to_s(:cn_time) %>
                    </p>
                    <a name="posts_<%= post.id %>"></a>
                    <div class="content">
                      <%= post.html_content.bbcode_to_html %>
                    </div>
                    <div class="signature">
                    </div>
                  </div>

                  <div class="back2top"><a class="top" href="#wrap">回顶</a></div>

                  <span class="corners-bottom"><span></span></span>
      </div>
	</div> 
    <hr class="divider"/>
<% end %>
            <%#= render :partial => "share/pagination",:locals => { :type => "reply",:post => @topic,:to_pagination => @posts,:show_redirect => true} %>
            <!-- 结束回帖 -->	
            



